export const namespace = "contentAnnounce";

export const calcColumns = (params) => {
  const { operate, venueArr } = params;
  // let enumlist = {};
  // venueArr.forEach((v) => {
  //   enumlist[v.id] = {
  //     text: v.venueName,
  //   };
  // });
  const columns = [
    {
      title: "ID",
      hidden: process.env.UMI_ENV == "prod" ? true : false,
      width: 250,
      dataIndex: "id",
      hideInSearch: true,
    },
    {
      title: "公告标题",
      dataIndex: "noticeTitle",
      ellipsis: true,
      copyable: true,
    },
    // {
    //   dataIndex: "venueId",
    //   title: "所属场馆",
    //   valueEnum: enumlist,
    //   width: 150,
    // },
    {
      title: "状态",
      dataIndex: "status",
      width: 180,
      valueEnum: {
        0: { text: "草稿", status: "Default" },
        1: { text: "上架", status: "Success" },
        2: { text: "下架", status: "Default" },
      },
    },
  ];

  columns.push(operate);
  return columns;
};
